package com.bluesky.javawebbrowser.domain.html.tags;

public class Img extends Tag {

	public Img() {
		super(TagType.IMG);
	}

	public Img(Tag tag) {
		super(tag);
		tagType = TagType.IMG;

	}

	public Integer getWidth() {
		String s = (String) getAttribute("width");
		Integer i = null;
		if (s != null)
			i = Integer.valueOf(s);
		return i;
	}

	public void setWidth(Integer width) {
		setAttribute("width", width.toString());
	}

	public Integer getHeight() {
		String s = (String) getAttribute("height");
		Integer i = null;
		if (s != null)
			i = Integer.valueOf(s);
		return i;
	}

	public void setHeight(Integer height) {
		setAttribute("height", height.toString());
	}

	public String getSource() {
		return (String) getAttribute("src");
	}

	public void setSource(String src) {
		setAttribute("src", src);
	}

	public String getAlternate() {
		return (String) getAttribute("alt");
	}

	public void setAlternate(String alt) {
		setAttribute("alt", alt);
	}

}
